import React from 'react'
import {WhiteSpace, WingBlank} from "antd-mobile";
import TeamInjure from "./TeamInjure/TeamInjure";

const InjureInfo = props => {

    const {
        injury,
        currentGame: {
            home_team,
            away_team,
        },
    } = props


    const {
        home,
        away,
    } = injury


    const injuryTitle = (
        <WingBlank>
            <div className='flex-space-between-align-center'>
                <div className='game-room-analysis-title'>伤停情况</div>
            </div>
        </WingBlank>
    )

    const template = (
        <div style={containerStyle}>
            <WingBlank>
                <TeamInjure injureList={home} team={home_team}/>
            </WingBlank>

            <WhiteSpace/>

            <WingBlank>
                <TeamInjure injureList={away} team={away_team}/>
            </WingBlank>
        </div>
    )

    const noDateTemplate = (
        <div>
            <p>暂无数据</p>
        </div>
    )
    const noDate = home && away && home.length === 0 && away.length === 0


    return <>
        <WhiteSpace/>
        {injuryTitle}
        <WhiteSpace/>
        {template}
        <WhiteSpace/>
    </>
}

export default InjureInfo

const containerStyle = {
    backgroundColor: "#fff",
    width: '100%',
    paddingTop: '12px',
    paddingBottom: '12px',
}
